{ *** cef_dialog_handler_capi.h  *** }

  PCefFileDialogCallback = ^TCefFileDialogCallback;
  PCefDialogHandler = ^TCefDialogHandler;

  // Callback structure for asynchronous continuation of file dialog requests.
  TCefFileDialogCallback = record
    // Base structure.
    base: TCefBase;

    // Continue the file selection with the specified |file_paths|. This may be a
    // single value or a list of values depending on the dialog mode. An NULL
    // value is treated the same as calling cancel().
    cont: procedure(self: PCefFileDialogCallback; file_paths: TCefStringList); cconv;

    // Cancel the file selection.
    cancel: procedure(self: PCefFileDialogCallback); cconv;
  end;


  // Implement this structure to handle dialog events. The functions of this
  // structure will be called on the browser process UI thread.
  TCefDialogHandler = record
    // Base structure.
    base: TCefBase;

    // Called to run a file chooser dialog. |mode| represents the type of dialog
    // to display. |title| to the title to be used for the dialog and may be NULL
    // to show the default title ("Open" or "Save" depending on the mode).
    // |default_file_name| is the default file name to select in the dialog.
    // |accept_types| is a list of valid lower-cased MIME types or file extensions
    // specified in an input element and is used to restrict selectable files to
    // such types. To display a custom dialog return true (1) and execute
    // |callback| either inline or at a later time. To display the default dialog
    // return false (0).
    on_file_dialog: function(self: PCefDialogHandler; browser: PCefBrowser;
      mode: TCefFileDialogMode; const title, default_file_name: PCefString;
      accept_types: TCefStringList; callback: PCefFileDialogCallback): Integer; cconv;
  end;


